home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-14 | 45.9 KB | 1,394 lines | [TEXT/MPS ] |
-
- ;*******************************************************
- ;
- ; SCSI Driver 'Command Table'.
- ;
- ; Written by Matt Gulick. Started May 20,1988
- ;
- ; Copyright Apple Computer, Inc. 1988-90
- ;
- ;*******************************************************
-
- ;*******************************************************
- ;
- ; This file contains the Command Tables that actually
- ; drives the SCSI Driver when talking to a target
- ; device. By changing these tables, the SCSI Driver
- ; will be able to talk to almost any class of SCSI
- ; Device. There are actually two tables in this file.
- ; The first table is a list of a two word group for
- ; each command supported.
- ;
- ; The first word is the actual SCSI Command Number
- ; followed by the low word of that commands table
- ; address. We use the only the low word because the
- ; second table is in the same bank as the indexing
- ; table.
- ;
- ; The second table is the actual command translation
- ; data. The first word is a set of flags that
- ; indicate some of the translation and verification
- ; that needs to take place.
- ;
- ; Bit 15 = Data is being sent to the device
- ; 14 = Data is to be received by us
- ; 13 = This is a Status Command
- ; 12 = This is a Control Command
- ; 11 = Data I/O Command
- ; 10 = Device I/O Command
- ; 9 = Command Includes Block Number
- ; 8 = Must be first device if linked
- ; 7 = Internal Driver Command Only
- ; 6 = Must issue a DISK_SW with this call
- ; 5 = Results in device offline
- ; 4 = Reserved
- ; 3 = Command Data needs no translation
- ; 2 = Reserved
- ; 1 = Block request count goes into command
- ; 0 = Byte request count goes into command
- ;
- ; The second word is a time out tick count to be used by
- ; the SCSI Manager to determine when to abandone any SCSI
- ; Device transaction due to lack of response by the
- ; target. Each tick = 250 ms.
- ;
- ; Any additional words are only used if Bit 3 above is
- ; zero. The translation bytes conatin two offsets. A
- ; Source and a Destination offset. This is used by the
- ; driver to take information fron the caller's command
- ; (Source) and .OR. them in to their proper location in
- ; the SCSI Command Packet (Destination).
- ;
- ; MSBit LSBit
- ; %0000 0000 0000 0000
- ;
- ; R S R D
- ; e o e e
- ; s u s s
- ; e r e t
- ; r c r i
- ; v e v t
- ; e e i
- ; d d n
- ; a
- ; t
- ; i
- ; o
- ; n
- ;
- ; A NULL Word at any location in the command entry
- ; will terminate translation for that command.
- ;
- ;*******************************************************
-
- ;*******************************************************
- ;
- ; Revision History:
- ;
- ;*******************************************************
-
- ; May 20, 1988 File started.
- ; Feb 28, 1989 Added Tape Drive Tables
-
- STRING PASCAL
- BLANKS OFF
- PAGESIZE 70
- PRINT NOGEN
- PRINT NOMDIR
- MACHINE M65816
-
- PRINT OFF
-
- INCLUDE 'scsihd.equates'
- INCLUDE 'M16.MEMORY'
- INCLUDE 'M16.UTIL'
- PRINT ON
-
- EJECT
-
- ;*******************************************************
- ;
- ; List of Commands Supported:
- ;
- ;*******************************************************
-
- EXPORT cmd_t_tbl
- cmd_t_tbl PROC
-
- ;-------------------------------------------------------------------------------
-
- IF scsi_dtype = direct_acc THEN
- ;
- ;
- ;
- ;
- dc.w $0028 ; Command $28 'READ (EXTENDED)'
- dc.w scsi_cmd28 ; Mandatory
- ;
- dc.w $002A ; Command $2A 'WRITE (EXTENDED)'
- dc.w scsi_cmd2A ; Mandatory
- ;
- dc.w $0008 ; Command $08 'READ'
- dc.w scsi_cmd08 ; Mandatory
- ;
- dc.w $000A ; Command $0A 'WRITE'
- dc.w scsi_cmd0A ; Mandatory
- ;
- dc.w $0000 ; Command $00 'TEST UNIT READY'
- dc.w scsi_cmd00 ; Mandatory
- ;
- dc.w $0003 ; Command $03 'REQUEST SENSE'
- dc.w scsi_cmd03 ; Mandatory
- ;
- dc.w $0025 ; Command $25 'READ CAPACITY'
- dc.w scsi_cmd25 ; Mandatory
- ;
- dc.w $0012 ; Command $12 'INQUIRY'
- dc.w scsi_cmd12 ; Mandatory
- ;
- dc.w $001A ; Command $1A 'MODE SENSE'
- dc.w scsi_cmd1A ; Optional
- ;
- dc.w $0015 ; Command $15 'MODE SELECT'
- dc.w scsi_cmd15 ; Optional
- ;
- dc.w $0004 ; Command $04 'FORMAT UNIT'
- dc.w scsi_cmd04 ; Mandatory
- ;
- dc.w $001E ; Command $1E 'PREVENT/ALLOW REMOVAL'
- dc.w scsi_cmd1E ; Optional
- ;
- dc.w $0001 ; Command $01 'REZERO UNIT'
- dc.w scsi_cmd01 ; Optional
- ;
- dc.w $0007 ; Command $07 'REASSIGN BLOCKS'
- dc.w scsi_cmd07 ; Optional
- ;
- dc.w $000B ; Command $0B 'SEEK'
- dc.w scsi_cmd0B ; Optional
- ;
- dc.w $002B ; Command $2B 'SEEK (EXTENDED)'
- dc.w scsi_cmd2B ; Optional
- ;
- dc.w $0016 ; Command $16 'RESERVE UNIT'
- dc.w scsi_cmd16 ; Mandatory
- ;
- dc.w $0017 ; Command $17 'RELEASE UNIT'
- dc.w scsi_cmd17 ; Mandatory
- ;
- dc.w $001B ; Command $1B 'START/STOP UNIT'
- dc.w scsi_cmd1B ; Optional
- ;
- dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
- dc.w scsi_cmd1C ; Optional
- ;
- dc.w $001D ; Command $1D 'SEND DIAGNOSTICS'
- dc.w scsi_cmd1D ; Mandatory
- ;
- dc.w $002E ; Command $2E 'WRITE AND VERIFY'
- dc.w scsi_cmd2E ; Optional
- ;
- dc.w $002F ; Command $2F 'VERIFY'
- dc.w scsi_cmd2F ; Optional
- ;
- dc.w $0033 ; Command $33 'SET LIMITS'
- dc.w scsi_cmd33 ; Optional
- ;
- dc.w $0034 ; Command $34 'PRE-FETCH'
- dc.w scsi_cmd34 ; Optional
- ;
- dc.w $0035 ; Command $35 'SYNCHRONIZE CACHE'
- dc.w scsi_cmd35 ; Optional
- ;
- dc.w $0036 ; Command $36 'LOCK/UNLOCK CACHE'
- dc.w scsi_cmd36 ; Optional
- ;
- dc.w $0037 ; Command $37 'READ DEFECT DATA'
- dc.w scsi_cmd37 ; Optional
- ;
- dc.w $003B ; Command $3B 'WRITE BUFFER'
- dc.w scsi_cmd3B ; Optional
- ;
- dc.w $003C ; Command $3C 'READ BUFFER'
- dc.w scsi_cmd3C ; Optional
- ;
- dc.w $003E ; Command $3E 'READ LONG'
- dc.w scsi_cmd3E ; Optional
- ;
- dc.w $003F ; Command $3F 'WRITE LONG'
- dc.w scsi_cmd3F ; Optional
- ;
- dc.w $004C ; Command $4C 'LOG SELECT'
- dc.w scsi_cmd4C ; Optional
- ;
- dc.w $004D ; Command $4D 'LOG SENSE'
- dc.w scsi_cmd4D ; Optional
- ;
- dc.w $0055 ; Command $55 'MODE SELECT'
- dc.w scsi_cmd55 ; Optional
- ;
- dc.w $005A ; Command $5A 'MODE SENSE'
- dc.w scsi_cmd5A ; Mandatory
- ;
- dc.w $00B3 ; Command $B3 'SET LIMITS'
- dc.w scsi_cmdB3 ; Optional
-
- ENDIF
-
- ;-------------------------------------------------------------------------------
-
- IF scsi_dtype = apple_cd THEN
- ;
- ;
- dc.w $00CC ; Command $CC 'AUDIO STATUS'
- dc.w scsi_cmdCC ; Mandatory
- ;
- dc.w $0003 ; Command $03 'REQUEST SENSE'
- dc.w scsi_cmd03 ; Mandatory
- ;
- dc.w $0028 ; Command $28 'READ (EXTENDED)'
- dc.w scsi_cmd28 ; Mandatory
- ;
- dc.w $0008 ; Command $08 'READ'
- dc.w scsi_cmd08 ; Mandatory
- ;
- dc.w $0000 ; Command $00 'TEST UNIT READY'
- dc.w scsi_cmd00 ; Mandatory
- ;
- dc.w $0012 ; Command $12 'INQUIRY'
- dc.w scsi_cmd12 ; Mandatory
- ;
- dc.w $001A ; Command $1A 'MODE SENSE'
- dc.w scsi_cmd1A ; Optional
- ;
- dc.w $0025 ; Command $25 'READ CAPACITY'
- dc.w scsi_cmd25 ; Mandatory
- ;
- dc.w $0015 ; Command $15 'MODE SELECT'
- dc.w scsi_cmd15 ; Optional
- ;
- dc.w $00C0 ; Command $C0 'EJECT DISK'
- dc.w scsi_cmdC0 ; Mandatory
- ;
- dc.w $001E ; Command $1E 'PREVENT/ALLOW REMOVAL'
- dc.w scsi_cmd1E ; Optional
- ;
- dc.w $00C9 ; Command $C9 'AUDIO PLAY'
- dc.w scsi_cmdC9 ; Mandatory
- ;
- dc.w $00CA ; Command $CA 'AUDIO PAUSE'
- dc.w scsi_cmdCA ; Mandatory
- ;
- dc.w $00CB ; Command $CB 'AUDIO STOP'
- dc.w scsi_cmdCB ; Mandatory
- ;
- dc.w $00CD ; Command $CD 'AUDIO SCAN'
- dc.w scsi_cmdCD ; Mandatory
- ;
- dc.w $0001 ; Command $01 'REZERO UNIT'
- dc.w scsi_cmd01 ; Optional
- ;
- dc.w $000B ; Command $0B 'SEEK'
- dc.w scsi_cmd0B ; Optional
- ;
- dc.w $0016 ; Command $16 'RESERVE UNIT'
- dc.w scsi_cmd16 ; Mandatory
- ;
- dc.w $0017 ; Command $17 'RELEASE UNIT'
- dc.w scsi_cmd17 ; Mandatory
- ;
- dc.w $001B ; Command $1B 'START/STOP UNIT'
- dc.w scsi_cmd1B ; Optional
- ;
- dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
- dc.w scsi_cmd1C ; Optional
- ;
- dc.w $001D ; Command $1D 'SEND DIAGNOSTICS'
- dc.w scsi_cmd1D ; Mandatory
- ;
- dc.w $002B ; Command $2B 'SEEK (EXTENDED)'
- dc.w scsi_cmd2B ; Optional
- ;
- dc.w $002F ; Command $2F 'VERIFY'
- dc.w scsi_cmd2F ; Optional
- ;
- dc.w $003B ; Command $3B 'WRITE BUFFER'
- dc.w scsi_cmd3B ; Optional
- ;
- dc.w $003C ; Command $3C 'READ BUFFER'
- dc.w scsi_cmd3C ; Optional
- ;
- dc.w $004C ; Command $4C 'LOG SELECT'
- dc.w scsi_cmd4C ; Optional
- ;
- dc.w $004D ; Command $4D 'LOG SENSE'
- dc.w scsi_cmd4D ; Optional
- ;
- dc.w $0055 ; Command $55 'MODE SELECT (EXTENDED)'
- dc.w scsi_cmd55 ; Optional
- ;
- dc.w $005A ; Command $5A 'MODE SENSE (EXTENDED)'
- dc.w scsi_cmd5A ; Optional
- ;
- dc.w $00C1 ; Command $C1 'READ TOC'
- dc.w scsi_cmdC1 ; Mandatory
- ;
- dc.w $00C2 ; Command $C2 'READ Q SUBCODE'
- dc.w scsi_cmdC2 ; Mandatory
- ;
- dc.w $00C3 ; Command $C3 'READ HEADER'
- dc.w scsi_cmdC3 ; Mandatory
- ;
- dc.w $00C8 ; Command $C8 'AUDIO TRACK SEARCH'
- dc.w scsi_cmdC8 ; Mandatory
-
- ENDIF
-
- ;-------------------------------------------------------------------------------
-
- ;
- dc.w $FFFF ; End of the List.
- dc.w $FFFF ;
-
- EJECT
-
-
- ;*******************************************************
- ;
- ; Command translation Table:
- ;
- ;*******************************************************
-
- ;*******************************************************
- ;
- ;scsi_cmdxx dc.w scsit_tx++\ ; SCSI Send Data Command
- ; scsit_rx++\ ; SCSI Receive Data Command
- ; scsit_stat++\ ; SCSI Status Command
- ; scsit_cont++\ ; SCSI Control Command
- ; scsit_data++\ ; SCSI Data I/O Command
- ; scsit_dvc++\ ; SCSI Device I/O Command
- ; scsit_blk++\ ; Command has a Block Number
- ; scsic_1st++\ ; Must be first device if linked
- ; scsic_int++\ ; Internal Driver Command only
- ; scsic_dsw++\ ; Issue DISK_SW with this call
- ; scsic_off++\ ; Device is going offline.
- ; scsic_tout++\ ; Adjust time out by block count
- ; scsid_asis++\ ; CMD Data is in SCSI format
- ; scsid_blk++\ ; Convert Trans Count to Blocks
- ; scsid_byte++\ ; Leave Trans Count in Bytes
- ; scsid_none ; Transfer count does not go in CMD
- ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- ; dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ;*******************************************************
-
- ;-------------------------------------------------------------------------------
-
- IF scsi_dtype = direct_acc THEN
-
- ;
- ; Command $00 'TEST UNIT READY'
- ; Mandatory
- ;
- scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $01 'REZERO UNIT'
- ; Optional
- ;
- scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 2*one_min ; Time out = 2 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $03 'REQUEST SENSE'
- ; Mandatory
- ;
- scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $04 'FORMAT UNIT'
- ; Mandatory
- ;
- scsi_cmd04 dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsic_dsw++\ ; Issue DISK_SW with this call
- scsic_off++\ ; Device is going offline.
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 60*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $07 'REASSIGN BLOCKS'
- ; Optional
- ;
- scsi_cmd07 dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsic_int++\ ; Internal Driver Command Only
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_sec ; Time out = one second.
- dc.w scsi_endcmd
- ;
- ; Command $08 'READ'
- ; Mandatory
- ;
- scsi_cmd08 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_data++\ ; It is a Data I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_blk ; Length is in Blocks
- dc.w one_sec ; Time out = 1 second/Block.
- dc.w scsi_endcmd
- ;
- ; Command $0A 'WRITE'
- ; Mandatory
- ;
- scsi_cmd0A dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_data++\ ; It is a Data I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_blk ; Length is in Blocks
- dc.w one_sec ; Time out = 1 second/Block.
- dc.w scsi_endcmd
- ;
- ; Command $0B 'SEEK'
- ; Optional
- ;
- scsi_cmd0B dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_sec ; Time out = 1 second.
- dc.w scsi_endcmd
- ;
- ; Command $12 'INQUIRY'
- ; Mandatory
- ;
- scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $15 'MODE SELECT'
- ; Optional
- ;
- scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 20*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $16 'RESERVE UNIT'
- ; Mandatory
- ;
- scsi_cmd16 dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $17 'RELEASE UNIT'
- ; Mandatory
- ;
- scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $1A 'MODE SENSE'
- ; Optional
- ;
- scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $1B 'START/STOP UNIT'
- ; Optional
- ;
- scsi_cmd1B dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsic_dsw++\ ; Issue DISK_SW with this call
- scsic_off++\ ; Device is going offline.
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 20*qtr_sec ; Time out = 20 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
- ; Optional
- ;
- scsi_cmd1C dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $1D 'SEND DIAGNOSTICS'
- ; Mandatory
- ;
- scsi_cmd1D dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $1E 'PREVENT/ALLOW REMOVAL'
- ; Optional
- ;
- scsi_cmd1E dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $25 'READ CAPACITY'
- ; Mandatory
- ;
- scsi_cmd25 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $28 'READ (EXTENDED)'
- ; Mandatory
- ;
- scsi_cmd28 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_data++\ ; It is a Data I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_blk ; Length is in Blocks
- dc.w one_sec ; Time out = 1 second/Block.
- dc.w scsi_endcmd
- ;
- ; Command $2A 'WRITE (EXTENDED)'
- ; Mandatory
- ;
- scsi_cmd2A dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_data++\ ; It is a Data I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_blk ; Length is in Blocks
- dc.w one_sec ; Time out = 1 second/Block.
- dc.w scsi_endcmd
- ;
- ; Command $2B 'SEEK (EXTENDED)'
- ; Optional
- ;
- scsi_cmd2B dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $2E 'WRITE AND VERIFY'
- ; Optional
- ;
- scsi_cmd2E dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_data++\ ; It is a Data I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_blk ; Length is in Blocks
- dc.w one_sec ; Time out = 1 second/Block.
- dc.w scsi_endcmd
- ;
- ; Command $2F 'VERIFY'
- ; Optional
- ;
- scsi_cmd2F dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w one_sec ; Time out = 1 second/Block.
- dc.w scsi_endcmd
- ;
- ; Command $33 'SET LIMITS'
- ; Optional
- ;
- scsi_cmd33 dc.w scsit_cont++\ ; It is a Control Command
- scsic_int++\ ; Internal Driver Command Only
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $34 'PRE-FETCH'
- ; Optional
- ;
- scsi_cmd34 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $35 'SYNCHRONIZE CACHE'
- ; Optional
- ;
- scsi_cmd35 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $36 'LOCK/UNLOCK CACHE'
- ; Optional
- ;
- scsi_cmd36 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $37 'READ DEFECT DATA'
- ; Optional
- ;
- scsi_cmd37 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $3B 'WRITE BUFFER'
- ; Optional
- ;
- scsi_cmd3B dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_data++\ ; It is a Data I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $3C 'READ BUFFER'
- ; Optional
- ;
- scsi_cmd3C dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_data++\ ; It is a Data I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $3E 'READ LONG'
- ; Optional
- ;
- scsi_cmd3E dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_data++\ ; It is a Data I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $3F 'WRITE LONG'
- ; Optional
- ;
- scsi_cmd3F dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_data++\ ; It is a Data I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $4C 'LOG SELECT'
- ; Optional
- ;
- scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_data++\ ; SCSI Data I/O Command
- scsid_asis++\ ; CMD Data is in SCSI format
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $4D 'LOG SENSE'
- ; Optional
- ;
- scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command
- scsit_stat++\ ; SCSI Status Command
- scsit_data++\ ; SCSI Data I/O Command
- scsid_asis++\ ; CMD Data is in SCSI format
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $55 'MODE SELECT'
- ; Optional
- ;
- scsi_cmd55 dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w one_sec ; Time out = 4 qtr second tick.
- dc.w scsi_endcmd
- ;
- ; Command $5A 'MODE SENSE'
- ; Mandatory
- ;
- scsi_cmd5A dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
- ;
- ; Command $B3 'SET LIMITS'
- ; Optional
- ;
- scsi_cmdB3 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd
-
- ENDIF
-
- ;-------------------------------------------------------------------------------
-
- IF scsi_dtype = apple_cd THEN
-
- ;
- ; Command $00 'TEST UNIT READY'
- ; Mandatory
- ;
- scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 5*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $01 'REZERO UNIT'
- ; Optional
- ;
- scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $03 'REQUEST SENSE'
- ; Mandatory
- ;
- scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $08 'READ'
- ; Mandatory
- ;
- scsi_cmd08 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_data++\ ; It is a Data I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_blk ; Length is in Blocks
- dc.w 4*qtr_sec ; Time out = 1 second/block.
- dc.w scsi_endcmd
- ;
- ; Command $0B 'SEEK'
- ; Optional
- ;
- scsi_cmd0B dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $12 'INQUIRY'
- ; Mandatory
- ;
- scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $15 'MODE SELECT'
- ; Optional
- ;
- scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $16 'RESERVE UNIT'
- ; Mandatory
- ;
- scsi_cmd16 dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $17 'RELEASE UNIT'
- ; Mandatory
- ;
- scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $1A 'MODE SENSE'
- ; Optional
- ;
- scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $1B 'START/STOP UNIT'
- ; Optional
- ;
- scsi_cmd1B dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_1st++\ ; Must be first device if linked
- scsic_dsw++\ ; Issue DISK_SW with this call
- scsic_off++\ ; Device is going offline.
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
- ; Optional
- ;
- scsi_cmd1C dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $1D 'SEND DIAGNOSTICS'
- ; Mandatory
- ;
- scsi_cmd1D dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $1E 'PREVENT/ALLOW REMOVAL'
- ; Optional
- ;
- scsi_cmd1E dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $25 'READ CAPACITY'
- ; Mandatory
- ;
- scsi_cmd25 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $28 'READ (EXTENDED)'
- ; Mandatory
- ;
- scsi_cmd28 dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_data++\ ; It is a Data I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_blk ; Length is in Blocks
- dc.w 4*qtr_sec ; Time out = 1 second/block.
- dc.w scsi_endcmd
- ;
- ; Command $2B 'SEEK (EXTENDED)'
- ; Optional
- ;
- scsi_cmd2B dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 1*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $2F 'VERIFY'
- ; Optional
- ;
- scsi_cmd2F dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_tout++\ ; Adjust time out by block count
- scsit_blk++\ ; It has a Block Number
- scsid_asis++\ ; It is an as is Packet
- scsid_none ; Length is not in command
- dc.w 4*qtr_sec ; Time out = 1 second/block.
- dc.w scsi_endcmd
- ;
- ; Command $3B 'WRITE BUFFER'
- ; Optional
- ;
- scsi_cmd3B dc.w scsit_tx++\ ; It sends data to the target
- scsit_cont++\ ; It is a Control Command
- scsit_data++\ ; It is a Data I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $3C 'READ BUFFER'
- ; Optional
- ;
- scsi_cmd3C dc.w scsit_rx++\ ; It requests data from target
- scsit_stat++\ ; It is a Status Command
- scsit_data++\ ; It is a Data I/O Command
- scsid_asis++\ ; It is an as is Packet
- scsid_byte ; Length is in Bytes
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $4C 'LOG SELECT'
- ; Optional
- ;
- scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_data++\ ; SCSI Data I/O Command
- scsid_asis++\ ; CMD Data is in SCSI format
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $4D 'LOG SENSE'
- ; Optional
- ;
- scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command
- scsit_stat++\ ; SCSI Status Command
- scsit_data++\ ; SCSI Data I/O Command
- scsid_asis++\ ; CMD Data is in SCSI format
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $55 'MODE SELECT (EXTENDED)'
- ; Optional
- ;
- scsi_cmd55 dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_asis++\ ; CMD Data is in SCSI format
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $5A 'MODE SENSE (EXTENDED)'
- ; Optional
- ;
- scsi_cmd5A dc.w scsit_rx++\ ; SCSI Receive Data Command
- scsit_stat++\ ; SCSI Status Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_asis++\ ; CMD Data is in SCSI format
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 4*qtr_sec ; Time out = 4 qtr second ticks.
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $C0 'EJECT DISK'
- ; Mandatory
- ;
- scsi_cmdC0 dc.w scsit_cont++\ ; It is a Control Command
- scsit_dvc++\ ; It is a Device I/O Command
- scsic_dsw++\ ; Issue DISK_SW with this call
- scsic_off++\ ; Device is going offline.
- scsid_asis++\ ; CMD Data is in SCSI format
- scsid_none ; Length is not in command
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w scsi_endcmd
- ;
- ; Command $C1 'READ TOC'
- ; Mandatory
- ;
- scsi_cmdC1 dc.w scsit_rx++\ ; SCSI Receive Data Command
- scsit_stat++\ ; SCSI Status Command
- scsit_data++\ ; SCSI Data I/O Command
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w $0205
- dc.w $0307
- dc.w $0408
- dc.w $0509
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $C2 'READ Q SUBCODE'
- ; Mandatory
- ;
- scsi_cmdC2 dc.w scsit_rx++\ ; SCSI Receive Data Command
- scsit_stat++\ ; SCSI Status Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $C3 'READ HEADER'
- ; Mandatory
- ;
- scsi_cmdC3 dc.w scsit_rx++\ ; SCSI Receive Data Command
- scsit_stat++\ ; SCSI Status Command
- scsit_data++\ ; SCSI Data I/O Command
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w $0202
- dc.w $0303
- dc.w $0404
- dc.w $0505
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $C8 'AUDIO TRACK SEARCH'
- ; Mandatory
- ;
- scsi_cmdC8 dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_none ; Transfer count does not go in CMD
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w $0201
- dc.w $0301
- dc.w $0402
- dc.w $0503
- dc.w $0604
- dc.w $0705
- dc.w $0809
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $C9 'AUDIO PLAY'
- ; Mandatory
- ;
- scsi_cmdC9 dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_none ; Transfer count does not go in CMD
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w $0201
- dc.w $0301
- dc.w $0402
- dc.w $0503
- dc.w $0604
- dc.w $0705
- dc.w $0809
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $CA 'AUDIO PAUSE'
- ; Mandatory
- ;
- scsi_cmdCA dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_none ; Transfer count does not go in CMD
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w $0201
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $CB 'AUDIO STOP'
- ; Mandatory
- ;
- scsi_cmdCB dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_none ; Transfer count does not go in CMD
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w $0202
- dc.w $0303
- dc.w $0404
- dc.w $0505
- dc.w $0609
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $CC 'AUDIO STATUS'
- ; Mandatory
- ;
- scsi_cmdCC dc.w scsit_rx++\ ; SCSI Receive Data Command
- scsit_stat++\ ; SCSI Status Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_byte ; Leave Trans Count in Bytes
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w $0201
- dc.w $0301
- dc.w $0402
- dc.w $0503
- dc.w $0604
- dc.w $0705
- dc.w $0809
- dc.w scsi_endcmd ; End of SCSI Translation Table
- ;
- ; Command $CD 'AUDIO SCAN'
- ; Mandatory
- ;
- scsi_cmdCD dc.w scsit_tx++\ ; SCSI Send Data Command
- scsit_cont++\ ; SCSI Control Command
- scsit_dvc++\ ; SCSI Device I/O Command
- scsid_none ; Transfer count does not go in CMD
- dc.w 10*one_min ; Time out = 10 minutes.
- dc.w $0101
- dc.w scsi_endcmd ; End of SCSI Translation Table
-
- ENDIF
-
- ;-------------------------------------------------------------------------------
-
-
- ENDP
-
- EJECT
-
-
- ;*******************************************************
- ;
- ; Command Packet Size Table:
- ;
- ; This table is indexed by (Group Number * 6)
- ;
- ; The first word in an entry equals the Packet Size.
- ; This is used to set the command length in the data
- ; for the SCSI Manager calls. If this value is null,
- ; then the group is undefined for this driver.
- ;
- ; The next byte is the offset to the first and most
- ; significant byte of the requested block number if
- ; used in this packet.
- ;
- ; The byte following this is the number of bytes that
- ; make up a valid Block Number.
- ;
- ; The next byte is the offset to the first and most
- ; significant byte of the requested data length if
- ; used in this packet.
- ;
- ; The byte following this is the number of bytes that
- ; make up a valid request length.
- ;
- ;*******************************************************
-
- EXPORT cmd_ps_tbl
- cmd_ps_tbl PROC
- start_tbl
- ;
- ; Group 0 Commands
- ;
- dc.w 0006 ; 6 Byte Command.
- dc.b $03 ; Offset to last Block Parm
- EXPORT c_blk_len:EQU
- c_blk_len equ *-start_tbl ; Equated offset to Block Length
- dc.b $02 ; Length of Block Parm
- dc.b $04 ; Offset to last Length Parm
- EXPORT c_len_len:EQU
- c_len_len equ *-start_tbl ; Equated offset to Length Length
- dc.b $01 ; Length of Length Parm
- ;
- ; Group 1 Commands
- ;
- dc.w 0010 ; 10 Byte Command.
- dc.b $05 ; Offset to last Block Parm
- dc.b $04 ; Length of Block Parm
- dc.b $08 ; Offset to last Length Parm
- dc.b $03 ; Length of Length Parm
- ;
- ; Group 2 Commands
- ;
- dc.w 0010 ; 10 Byte Command.
- dc.b $05 ; Offset to last Block Parm
- dc.b $04 ; Length of Block Parm
- dc.b $08 ; Offset to last Length Parm
- dc.b $03 ; Length of Length Parm
- ;
- ; Group 3 Commands
- ;
- dc.w 0000 ; Reserved Command.
- dc.b $00 ; Offset to last Block Parm
- dc.b $00 ; Length of Block Parm
- dc.b $00 ; Offset to last Length Parm
- dc.b $00 ; Length of Length Parm
- ;
- ; Group 4 Commands
- ;
- dc.w 0000 ; Reserved Command.
- dc.b $00 ; Offset to last Block Parm
- dc.b $00 ; Length of Block Parm
- dc.b $00 ; Offset to last Length Parm
- dc.b $00 ; Length of Length Parm
- ;
- ; Group 5 Commands
- ;
- dc.w 0012 ; 12 Byte Command.
- dc.b $05 ; Offset to last Block Parm
- dc.b $04 ; Length of Block Parm
- dc.b $09 ; Offset to last Length Parm
- dc.b $04 ; Length of Length Parm
- ;
- ; Group 6 Commands
- ;
- dc.w 0010 ; 10 Byte Command.
- dc.b $05 ; Offset to last Block Parm
- dc.b $04 ; Length of Block Parm
- dc.b $08 ; Offset to last Length Parm
- dc.b $03 ; Length of Length Parm
- ;
- ; Group 7 Commands
- ;
- dc.w 0000 ; Reserved Command.
- dc.b $00 ; Offset to last Block Parm
- dc.b $00 ; Length of Block Parm
- dc.b $00 ; Offset to last Length Parm
- dc.b $00 ; Length of Length Parm
-
- ENDP
-
- EJECT
-
- ;*******************************************************
- ;
- ; Internal Data Buffer:
- ;
- ; This buffer is used by the driver for all of it's
- ; maintainence I/O between it and the devices that it
- ; manages or communicates with. This is where any
- ; INQUIRY data will be received or blocks read in that
- ; are needed by the driver to make any kind of
- ; determination. There is also a section reserved for
- ; the REQUEST SENSE command for that last command sent.
- ;
- ;*******************************************************
-
- EXPORT internal_buff
- internal_buff PROC
-
-
- ;-------------------------------------------------------------------------------
-
- IF scsi_dtype = direct_acc THEN
-
- dcb.b block_size+20,0 ;Incase 532 byte block
-
- ENDIF
-
- ;-------------------------------------------------------------------------------
-
- IF scsi_dtype = apple_cd THEN
-
- dcb.b block_size*4,0 ;Worst case 2k Block size
-
- ENDIF
-
- ;-------------------------------------------------------------------------------
-
- ENDP
-
- END
-
- EJECT